<head>
<meta http-equiv='content-type' content='text/html; charset=utf8' />
<title>jsGoo tests</title><link rel='stylesheet' href='main.css' type='text/css' />
<script type='text/javascript' src='jsgoo.js'></script>
<script type='text/javascript'>

var showAdd = function() { _.$into('form', _f.render(DATA.form, 'form1', 'validate')); }

var validate = function(el) {
    _f.setVNotes($('form1'), DATA.vnotes); return false; 
}

//DATA 
var DATA = {
    form: { action: "/add", method: "post",
        fields: {
            name:       { label: "Name",    inp: { type: "text", name: "name" } },
            age:        { label: "Age",     inp: { type: "text", name: "age" } },
            submit:     {                   inp: { type: "submit", value: 'Add', cls: "submit" } }
        }
    },
    vnotes: { name: "required", age: "not number" }
} 
</script>
<body>
<div><a href="index.html">index</a> <a href="#" onclick="showAdd(); return false;">generate</a> 
<em>press Add button</em></div>
<div id="side-content"><div id="form" class="form"></div></div>
</body>
</html>
